package com.hecate.common.db.basedo;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Version;
import java.util.Date;

/**
 * @author 黄星星
 * @date 2020-12-09
 */
public class BaseDO implements IBase {
    /**
     * 主键
     */
    @Column(
            updatable = false,
            insertable = false
    )
    private Long id;

    /**
     * bid
     */
    @Id
    @Column(
            updatable = false
    )
    private String bid;

    /**
     * cid
     */
    @Column(
            updatable = false
    )
    private String cid;

    /**
     * 创建时间
     */
    @Column(
            updatable = false
    )
    private Date gmtCreate;

    /**
     * 更新时间
     */
    private Date gmtUpdate;

    /**
     * 数据库lock版本
     */
    @Version
    private String lockVersion;

    /**
     * 状态
     */
    private String status;


    protected String tableId() {
        return "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBid() {
        return bid;
    }

    public void setBid(String bid) {
        this.bid = bid;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtUpdate() {
        return gmtUpdate;
    }

    public void setGmtUpdate(Date gmtUpdate) {
        this.gmtUpdate = gmtUpdate;
    }

    public String getLockVersion() {
        return lockVersion;
    }

    public void setLockVersion(String lockVersion) {
        this.lockVersion = lockVersion;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
